//
//  MoveClass.cpp
//  Practice10
//
//  Created by 赵世杰 on 2020/7/25.
//  Copyright © 2020 zhaoshijie. All rights reserved.
//

#include "MoveClass.hpp"
#include <iostream>

using namespace std;


Move::Move(double a, double b)
{
    x = a;
    y = b;
    
}

void Move::showMove() const
{
    cout << "x:" << x << " y:" << y << endl;
}


Move Move::add(const Move &m) const
{
    Move mo;
    
    mo.x = x + m.x;
    mo.y = y + m.y;
    
    return mo;
}

//void reset(double a=0 , double b=0);

void Move::reset(double a , double b)
{
    x = a;
    y = b;
}
